<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>

    // var arr = [1, 2, 3, 4, 5, 6];
    // console.log(arr);

    // var arr = new Array(1, 2, 3, 4, 5, 6);
    // console.log(arr);


    var arr = [10];  // [10]
    console.log(arr);

    // 如果new Array() 只接收一个参数,且为number类型(整数),会生成对应长度的数据
    var arr = new Array(10); // [,,,,,,,,,]
    console.log(arr);

    var arr = new Array("10"); // ["10"]
    console.log(arr);




</script>

</html>